package com.cn.easy.export.model.excel

import org.apache.poi.ss.usermodel.CellStyle
import org.apache.poi.ss.usermodel.Sheet
import org.apache.poi.ss.usermodel.Workbook

data class ExportParam<Row>(
    /**
     * Sheet页名称
     */
    val sheetName: String? = null,
    /**
     * 标题
     */
    val excelTitle: ExcelTitle? = null,
    /**
     * 导出列
     */
    val columns: List<ExcelColumn<Row>>,
    /**
     * 导出数据
     */
    val list: List<Row>,
    /**
     * 默认表头样式
     */
    val headerStyle: ((Workbook) -> CellStyle)? = null,
    /**
     * 默认内容样式
     */
    val cellStyle: ((Workbook) -> CellStyle)? = null,

    /**
     * 合计行
     */
    val sumColumns: List<SumColumn<*>> = emptyList(),
    val customAction: ((Sheet, Int, ArrayList<ExcelCoordinateValue<*>> )-> Unit)? = null
)
